<?php echo $header;echo $sidebar ?>		
		<div class="span10 content">
			<?php echo $hugemenu ?>

            <h1><?php echo lang('hrm_staffadd_header'); ?></h1>
            <?php if ($message) { ?>
                <div class="alert alert-error">
                    <a class="close" data-dismiss="alert" href="#">x</a><?php echo $message; ?>
                </div>
            <?php } if ($success) { ?>
                <div class="alert alert-success">
                    <a class="close" data-dismiss="alert" href="#">x</a><?php echo $success; ?>
                </div>
            <?php } ?>
            <div class="alert alert-info"><?php echo lang('hrm_staffadd_message'); ?></div>
		
<link rel="stylesheet" href="<?php echo base_url() ?>assets/admin/css/jquery-ui.css">
<script type="text/javascript" src="<?php echo base_url() ?>assets/admin/js/jquery-1.9.1.js"></script>
<script type="text/javascript" src="<?php echo base_url() ?>assets/admin/js/jquery-ui.js"></script>
	<script>
		  $(function() {
		  
			$("#sdate").datepicker( {
				dateFormat:"yy-mm-dd"
			});
			 $("#edate").datepicker({
				dateFormat:"yy-mm-dd"
			});
		  });
		  </script>

			<div class="contentArea">
				<div class="widget">
					<div class="widget-head"><h3 class="heading"><?php echo lang('hrm_add_h2_title') ?></h3></div>
					<?php echo form_open_multipart(current_url(), array('class' => 'form-horizontal')); ?>
			<div class="widget-body">
                <div class="row-fluid">
                    <div class="span6">
                        <div class="control-group">
                            
							<label class="control-label"><?php echo lang('hrm_username_staff', 'Username'); ?></label>
                            <div class="controls">
                                <?php $username['class'] = 'span12';
									echo form_input($username);
								?>  
						    </div>
							<br>
							<label class="control-label"><?php echo lang('hrm_password_staff', 'Password'); ?></label>
							<div class="controls">
                                <?php $password['class'] = 'span12';  $password['name'] = 'password';
                                echo form_password($password);
                                ?>
                            </div><br>
							<label class="control-label"><?php echo lang('hrm_cpassword_staff', 'Confirm Password'); ?></label>
							<div class="controls">
                                <?php $cpassword['class'] = 'span12';
                                echo form_password($cpassword);
                                ?>
                            </div><br>
							
							
							<label class="control-label"><?php echo lang('hrm_group_staff', 'Group'); ?></label>
                            <div class="controls">
                                <?php $apartment['class'] = 'span12';
									$option = '';
									foreach ($grouplist as $lan): 
									
										if($this->data['group']['value']==$lan->id)
										{
											$option .="<option selected='selected' value='$lan->id'>$lan->name</option>";
										}
										else
										{
											$option .="<option value='$lan->id'>$lan->name</option>";
										}
									endforeach; 
								?>  
								<select id="group_id" name="group_id">
								<?php echo $option; ?>
								</select>
                            </div>
							<br>
							
							<label class="control-label"><?php echo lang('hrm_manager_staff', 'Manager'); ?></label>
                            <div class="controls">
                                <?php $apartment['class'] = 'span12';
								
									foreach ($userlist as $lans): 
									
										if($this->data['user']['value']==$lans->id)
										{
											$optionMananger .="<option selected='selected' value='$lans->id'>$lans->username</option>";
										}
										else
										{
											$optionMananger.="<option value='$lans->id'>$lans->username</option>";
										}
									endforeach; 
								?>  
								<select id="managerid" name="managerid">
								<?php echo $optionMananger; ?>
								</select>
                            </div>
							<br>
							
							<label class="control-label"><?php echo lang('hrm_fname_staff', 'First Name'); ?></label>
                            <div class="controls">
                                <?php $first_name['class'] = 'span12';
                                echo form_input($first_name);
                                ?>
                            </div><br>
							<label class="control-label"><?php echo lang('hrm_lname_staff', 'Last Name'); ?></label>
                            <div class="controls">
                                <?php $last_name['class'] = 'span12';
                                echo form_input($last_name);
                                ?>
                            </div><br>
							
							
							<label class="control-label"><?php echo lang('hrm_photo_staff', 'Photo'); ?></label>
                            <div class="controls">
                                <?php $photo['class'] = 'span12'; $photo['name'] = 'userphoto'; $photo['id'] = 'userphoto';
                                echo form_upload($photo);
                                ?>
                            </div><br>
							
							
							<label class="control-label"><?php echo lang('hrm_email_staff', 'Email'); ?></label>
							<div class="controls">
                                <?php $email['class'] = 'span12';
                                echo form_input($email);
                                ?>
                            </div><br>
                            
                            <label class="control-label"><?php echo lang('hrm_phonenumber_staff', 'Phone'); ?></label>
                            <div class="controls">
                                <?php $phonenumber['class'] = 'span12';
                                echo form_input($phonenumber);
                                ?>
                            </div>
							
							<br>
							<label class="control-label"><?php echo lang('hrm_active_staff', 'Active'); ?></label>
							<div class="controls">
                                <?php $active['class'] = 'span12';
									echo form_checkbox('active', '1', TRUE);
                                ?>
                            </div>
							
							<br>
							<label class="control-label"><?php echo lang('hrm_notify_staff', 'Notify User'); ?></label>
							<div class="controls">
                                <?php $active['class'] = 'span12';
									echo form_checkbox('notify', '1', TRUE);
                                ?>
                            </div>
							<br>
                            
							
							
							<div class="widget-head"><h3 class="heading">JOB</h3></div>
							
							<br>
							
							<label class="control-label"><?php echo lang('hrm_jname_staff', 'Job Name'); ?></label>
                            <div class="controls">
                                <?php $jobname['class'] = 'span12'; $jobname['name'] = 'jobname'; $jobname['id'] = 'jobname';
                                echo form_input($jobname);
                                ?>
                            </div><br>
							<label class="control-label"><?php echo lang('hrm_hsal_staff', 'Hourly Salary'); ?></label>
                            <div class="controls">
                                <?php $hsalary['class'] = 'span12'; $hsalary['name'] = 'hsalary'; $hsalary['id'] = 'hsalary';
                                echo form_input($hsalary);
                                ?>
                            </div>
								<br>
							
							<label class="control-label"><?php echo lang('hrm_weekhrs_staff', 'Weekly Hours'); ?></label>
                            <div class="controls">
                                <?php $whrs['class'] = 'span12'; $whrs['name'] = 'whrs'; $whrs['id'] = 'whrs';
                                echo form_input($whrs);
                                ?>
                            </div><br>
							<label class="control-label"><?php echo lang('hrm_sdate_staff', 'Start Date'); ?></label>
                            <div class="controls">
                                <?php $sdate['class'] = 'span12'; $sdate['name'] = 'sdate'; $sdate['id'] = 'sdate';
                                echo form_input($sdate);
                                ?>
                            </div>
							
							<br>
							<label class="control-label"><?php echo lang('hrm_edate_staff', 'End Date'); ?></label>
                            <div class="controls">
                                <?php $edate['class'] = 'span12'; $edate['name'] = 'edate'; $edate['id'] = 'edate';
                                echo form_input($edate);
                                ?>
                            </div>
							
							
                        </div>
                        <div class="control-group">
                            <label class="control-label"></label>
                            <div class="controls">
<?php echo form_submit('submit',($name['value']) ? lang('hrm_staff_update_head') : lang('hrm_staff_add_head'), 'class="btn btn-info span6"'); ?>
                            </div>
                        </div>          
                    </div>
                </div>
            </div>
					<?php echo form_close(); ?>	

				</div>

			</div>
			

        </div>
        <!--/content-->

<?php echo $footer ?>